package com.jk.service.impl;

import com.github.pagehelper.PageHelper;
import com.jk.bean.Page;
import com.jk.bean.SendPage;
import com.jk.bean.Staff;
import com.jk.mapper.PowerMapper;
import com.jk.service.PowerService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class PowerServiceImpl implements PowerService {
    @Resource
    private PowerMapper powerMapper;

    @Override
    public SendPage getQuanxian(Staff st,Page page) {
       List<Staff> list1 =powerMapper.getQuanxian(st);
        PageHelper.startPage(page.getPage(),page.getRows());
        List<Staff> list =powerMapper.getQuanxian(st);
        SendPage sendPage = new SendPage(list1.size(),list);
        return sendPage;
    }




}
